# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.

defmodule GoogleApi.ConsumerSurveys.V2.Model.SurveyQuestion do
  @moduledoc """


  ## Attributes

  - answerOrder (String):  Defaults to: `null`.
  - answers (List[String]):  Defaults to: `null`.
  - hasOther (Boolean):  Defaults to: `null`.
  - highValueLabel (String):  Defaults to: `null`.
  - images (List[SurveyQuestionImage]):  Defaults to: `null`.
  - lastAnswerPositionPinned (Boolean):  Defaults to: `null`.
  - lowValueLabel (String):  Defaults to: `null`.
  - mustPickSuggestion (Boolean):  Defaults to: `null`.
  - numStars (String):  Defaults to: `null`.
  - openTextPlaceholder (String):  Defaults to: `null`.
  - openTextSuggestions (List[String]):  Defaults to: `null`.
  - question (String):  Defaults to: `null`.
  - sentimentText (String):  Defaults to: `null`.
  - singleLineResponse (Boolean):  Defaults to: `null`.
  - thresholdAnswers (List[String]):  Defaults to: `null`.
  - type (String):  Defaults to: `null`.
  - unitOfMeasurementLabel (String):  Defaults to: `null`.
  - videoId (String):  Defaults to: `null`.
  """

  defstruct [
    :answerOrder,
    :answers,
    :hasOther,
    :highValueLabel,
    :images,
    :lastAnswerPositionPinned,
    :lowValueLabel,
    :mustPickSuggestion,
    :numStars,
    :openTextPlaceholder,
    :openTextSuggestions,
    :question,
    :sentimentText,
    :singleLineResponse,
    :thresholdAnswers,
    :type,
    :unitOfMeasurementLabel,
    :videoId
  ]
end

defimpl Poison.Decoder, for: GoogleApi.ConsumerSurveys.V2.Model.SurveyQuestion do
  import GoogleApi.ConsumerSurveys.V2.Deserializer

  def decode(value, options) do
    value
    |> deserialize(
      :images,
      :list,
      GoogleApi.ConsumerSurveys.V2.Model.SurveyQuestionImage,
      options
    )
  end
end

defimpl Poison.Encoder, for: GoogleApi.ConsumerSurveys.V2.Model.SurveyQuestion do
  def encode(value, options) do
    GoogleApi.ConsumerSurveys.V2.Deserializer.serialize_non_nil(value, options)
  end
end
